Use _gtk_widget_get_aux_info_or_defaults() when possible in gtkwidget.c
authorHavoc Pennington <hp@pobox.com>
Sun, 5 Sep 2010 16:14:40 +0000 (12:14 -0400)
committerHavoc Pennington <hp@pobox.com>
Mon, 13 Sep 2010 01:47:10 +0000 (21:47 -0400)
Did not update uses in other files because the plan is to
get rid of those other uses anyhow. So don't want to make
this function available in the header.

gtk/gtkwidget.c

index cd6404ac317d7b0e38fb3f4fe0b68553d896f2bb..cbb568fa03108377e1a9ab6907be65ec9908c52b 100644 (file)
@@ -8018,17 +8018,17 @@ gtk_widget_get_size_request (GtkWidget *widget,
                              gint      *width,
                              gint      *height)
 {
-  GtkWidgetAuxInfo *aux_info;
+  const GtkWidgetAuxInfo *aux_info;
 
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  aux_info = _gtk_widget_get_aux_info (widget, FALSE);
+  aux_info = _gtk_widget_get_aux_info_or_defaults (widget);
 
   if (width)
-    *width = aux_info ? aux_info->width : -1;
+    *width = aux_info->width;
 
   if (height)
-    *height = aux_info ? aux_info->height : -1;
+    *height = aux_info->height;
 }
 
 /**